<html>
<head>
	<title>js_02</title>
	<meta charset="utf-8"/>
	<style>
		#div1{
			width:200px;height:300px;border:1px solid red;
		}
	</style>
	<script>
		window.onload=function(){
			/*var oDiv=document.getElementById("div1");
			if(oDiv.currentStyle){
				alert(oDiv.currentStyle.width);
			}else{
				alert(getComputedStyle(oDiv,null).width);
			}*/
			var s="121";
			alert(s.charAt(1));
		}
	</script>
</head>
<body>
	<div id="div1"></div>
</body>
</html>